<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品操作记录">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span> 商品管理  <span class="c-gray en">&gt;</span> 商品操作记录 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container"> 
  <form method="post" name="query_productLog_list_form"  id="query_productLog_list_form" action="${contextPath}/productLog/query_productLog_list" >    
  <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />  
  	 <input type="hidden" id="proId" name="proId"  value="${proId}"/>                      
  <div class="text-c">
       <table class="table search_table">
          <tr>  
           <td >用户名：</td>
           <td >
           <input type="text" class="input-text radius"  placeholder="请输入用户名" value="${productLogQo.userName}" id="userName" name="userName"/>
           </td>   
           <td >商品编码：</td>
           <td >
           <input type="text" class="input-text radius"  placeholder="请输入商品编码" value="${(productLogQo.pid?c)!}" id="pid" name="pid"   onkeyup="this.value=this.value.replace(/\D/g,'')"  onafterpaste="this.value=this.value.replace(/\D/g,'')"  />
           </td>  
           <td >商品名称：</td>
           <td >
           <input type="text" class="input-text radius"  placeholder="请输入商品名称" value="${productLogQo.pName}" id="pName" name="pName"/>
           </td>  
         </tr>
         <tr>
          <td>商品类型：</td>
           <td>
           <span class="select-box radius">
           <select class="select"  name="pType" >
            <option value>请选择商品类型</option>
            <option  value="1" <#if productLogQo.pType=1>selected="selected"</#if>>${map_ptype["1"]}</option>
            <option  value="2" <#if productLogQo.pType=2>selected="selected"</#if>>${map_ptype["2"]}</option>
            <option  value="3" <#if productLogQo.pType=3>selected="selected"</#if>>${map_ptype["3"]}</option>
            <option  value="4" <#if productLogQo.pType=4>selected="selected"</#if>>${map_ptype["4"]}</option>  
            <option  value="5" <#if productLogQo.pType=5>selected="selected"</#if>>${map_ptype["5"]}</option>     
           </select>
           </span>         
          </td>
           <td>商户名称：</td>
           <td>
           <span class="select-box radius">
           <select class="select"  name="custName" >
           <option value>请选择商户名称</option>
             <#list merchants as list>  
                 <option value="${list.id?c}" <#if list.mercName==productLogQo.custName>selected="selected"</#if>>${list.mercName}</option>
             </#list>
           </select>
           </span>
           </td>
           <td>操作时间：</td>
           <td><input  type="text" onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',readOnly: true })" id="startDate" 
               value='${(productLogQo.beginDate?string("yyyy-MM-dd"))!}' name="beginDate"  class="input-text Wdate" style="width:45%;">
                                                至
               <input  type="text" onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'startDate\')}',maxDate:'%y-%M-%d',readOnly: true })" id="endDate" 
               value='${(productLogQo.endDate?string("yyyy-MM-dd"))!}' name="endDate"    class="input-text Wdate" style="width:45%;">
           </td>
         </tr>
                
          <tr>
           <td>操作分类：</td>
           <td>
           <span class="select-box radius">
           <select class="select"  name="pIsBuy" >
           <option value>请选择操作分类</option>
           <#list map_pperation?keys as key>
                  <option value="${key}" <#if key==productLogQo.pIsBuy>selected="selected"</#if>>${map_pperation["${key}"]}</option> 
           </#list>
           </select>
           </span>
           </td>
          <td>上架状态：</td>
           <td>
           <span class="select-box radius">
           <select class="select"  name="formerType" >
            <option value>请选择操作前状态</option>
            <option  value="3" <#if productLogQo.formerType==3>selected="selected"</#if>>已上架</option>
            <option  value="4" <#if productLogQo.formerType==4>selected="selected"</#if>>未上架</option>       
           </select>
           </span>         
          </td>
          <td></td>
         </tr>
         <tr>
         <td  colspan="6" style="text-align:center;" >
           <input class="btn btn-success radius" type="button"  onclick="search();"  value="搜索" />
           <input class="btn btn-success radius" type="button"  onclick="toIsEmpty();" value="重置" />
           <input class="btn btn-success radius" type="button"  onclick="search();"   value="刷新" />
         </td></tr>
      </table>
    </div>
  </form>
    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
     <span class="r">共有数据：<strong>${pagination.totalCount}</strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        <tr  class="text-c">
            <th >用户名称</th>
            <th >记录时间</th>
            <th >商品编码</th>
            <th >商品类型</th>
            <th >商品名称</th>
            <th >操作前状态</th>
            <th >操作</th>
        </tr>
        </thead>
        <tbody>
          <#list pagination.list as list> 
             <tr  class="text-c">
               <td>${list.userName}</td>
               <td>${(list.createDate?string("yyyy-MM-dd HH:mm:ss"))!}</td>
               <td>${(list.pid?c)!}</td>
               <td>${map_ptype["${list.pType}"]}</td>
               <td>${list.pName}</td>
               <td>
               <#if list.formerType==5>已上架
               <#elseif list.formerType==4>未上架   
               <#elseif list.formerType==6>过期                    
               <#else>       已上架             
              </#if></td>
               <td>${map_pperation["${list.pIsBuy}"]}</td>
            </tr>
        </#list>
        </tbody>
    </table>
    <div id="div_page" style="padding-top: 10px;float: right"></div>
</div>
</div>
<@frame.end "default">
</@frame.end>
</html>
<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/productLog/query_productLog_list.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'div_page',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
    last: ${pagination.totalPage},
	skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
            $("#page").val(obj.curr);
            $("#query_productLog_list_form").submit();
        }
    }
})  

</script>